package com.dianxin.smartpark.web.common;

import java.util.List;

import com.chinatelecom.response.common.CommonResponseBody;
import com.dianxin.smartpark.dao.qo.common.SmartParkMessageQO;
import com.dianxin.smartpark.service.common.SmartParkMessageService;
import com.dianxin.smartpark.service.vo.common.SmartParkMessageVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 消息管理
 * 
 * @author chenjiasong
 * @date 2021-08-16
 */
@RestController
@RequestMapping("/smartpark/message")
public class SmartParkMessageController
{
    @Resource
    private SmartParkMessageService smartParkMessageService;

    /**
     * 查询消息管理列表
     */
    @GetMapping("/list")
    public CommonResponseBody<List<SmartParkMessageVO>>  list(SmartParkMessageQO qo)
    {
        return smartParkMessageService.selectSmartParkMessageList(qo);
    }


    /**
     * 获取消息管理详细信息
     */
    @GetMapping(value = "/getInfo")
    public CommonResponseBody<SmartParkMessageVO> getInfo(SmartParkMessageQO qo)
    {
        return smartParkMessageService.selectSmartParkMessage(qo);
    }

    /**
     * 新增消息管理
     */
    @PostMapping("/add")
    public  CommonResponseBody<Boolean> add(@RequestBody SmartParkMessageVO vo)
    {
        return smartParkMessageService.insertSmartParkMessage(vo);
    }

    /**
     * 修改消息管理
     */
    @PutMapping("/edit")
    public  CommonResponseBody<Boolean> edit(@RequestBody SmartParkMessageVO vo)
    {
        return smartParkMessageService.updateSmartParkMessage(vo);
    }

    /**
     * 删除消息管理
     */
	@DeleteMapping("/remove")
    public  CommonResponseBody<Boolean> remove(@RequestBody SmartParkMessageVO vo)
    {
        return smartParkMessageService.deleteSmartParkMessage(vo);
    }
}
